

IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[spPayIns_InsertPayIn]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
	DROP PROCEDURE [dbo].[spPayIns_InsertPayIn]
GO

GO
SET QUOTED_IDENTIFIER ON
GO
-- =============================================
-- Author:		Eric Liew
-- Create date: 6/2/2009
-- Description:	Insert a Plate
-- =============================================
CREATE PROCEDURE [dbo].[spPayIns_InsertPayIn]
(
	@PayInDate DATETIME,
	@ShiftId Int,
	@ScheduleDriverTaxiId Int,
	@TaxiId Int,
	@DriverId Int,
	@Cash decimal,
	@M7 decimal,
	@EftPos decimal,
	@Expenses decimal,
	@Comment varchar(500),
	@CarriedFwdPayIn decimal,
	@Claims decimal
)
AS


BEGIN
	-- SET NOCOUNT ON added to prevent extra result sets from
	-- interfering with SELECT statements.
	SET NOCOUNT ON;

	INSERT PayIn
	(
		PayInDate,
		ShiftId,
		ScheduleDriverTaxiId,
		TaxiId,
		DriverId,
		Cash,
		M7,
		EftPos,
		Expenses,
		Comment,
		CarriedFwdPayIn,
		Claims 
	)
	VALUES
	(
		@PayInDate,
		@ShiftId,
		@ScheduleDriverTaxiId,
		@TaxiId,
		@DriverId,
		@Cash,
		@M7,
		@EftPos,
		@Expenses,
		@Comment,
		@CarriedFwdPayIn,
		@Claims
	) 	
	
	RETURN @@IDENTITY 
  

END
GO
